package com.example.micrapi.feign;

import com.example.micrapi.pojo.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "dataservice", path = "/dataservice/sysUser", contextId = "sysUser")
public interface SysUserServiceFeign {

    @GetMapping("/findByUserName")
    SysUser findByUserName(@RequestParam("username") String username,
                           @RequestParam("type") int type);

    @PostMapping("/updateLastTime")
    Boolean updateLastTime(@RequestBody SysUser sysUser);
}
